home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / tcp / AmiTCP_22to23.lha / AmiTCP-2.3 / NcFTP_diffs.txt < prev    next >
Text File  |  1993-12-23  |  3KB  |  146 lines

  1. smakefile:
  2.  
  3. 26,27c26,27
  4. <     OPTIMIZE OPTTIME \
  5. < #    DEBUG=FF
  6. ---
  7. >     OPTIMIZE OPTTIME
  8. > #    Debug=FF
  9. 33c33
  10. < EXTOBJS=amigalib/wait.c amigalib/s_socket.o amigalib/popen.o amigalib/waccess.o \
  11. ---
  12. > EXTOBJS=amigalib/wait.o amigalib/s_socket.o amigalib/popen.o amigalib/waccess.o \
  13.  
  14. main.c
  15.  
  16. 10c10
  17. < #define FTP_VERSION "1.5.6 (September 20, 1993), Amiga version 1.01 (Nov 13, 1993)\n"
  18. ---
  19. > #define FTP_VERSION "1.5.6 (September 20, 1993), Amiga version 1.02 (Dec 21, 1993)\n"
  20. 17a18,19
  21. > #if __SASC
  22. > extern int __buffsize;
  23. 18a21
  24. > #endif
  25. 483a487,490
  26. > #if defined(amigados) && __SASC
  27. >     __buffsize = xferbufsize; /* xferbufsize is initialized by now */
  28. > #endif
  29.  
  30. ftp.c:
  31.  
  32. 1265,1269d1264
  33. < #ifdef amigados
  34. <         /* greater buffer may reduce disk io */
  35. <         if(fout)
  36. <             setvbuf(fout, NULL, _IOFBF, 65536); 
  37. < #endif
  38. 1277d1271
  39. 1280,1281c1274,1278
  40. <     int                            c, d, do2;
  41. ---
  42. >     int    c, d, do2;
  43. >     int bytes_in = 0;            /* bytes received to xferbuf */
  44. >     int in_file = fileno(din),
  45. >         out_file = fileno(fout);
  46. >     
  47. 1287,1289c1284,1288
  48. <         /* Read a block from the input stream. */
  49. <         c = read(fileno(din), xferbuf, (int)xferbufsize);
  50. ---
  51. >       /* Read a block from the input stream. */
  52. >       c = read(in_file, xferbuf+bytes_in, (int)xferbufsize-bytes_in);
  53. >       
  54. >       /* Check for errors that may have occurred while reading. */
  55. >       if (c <= 0) {
  56. 1292,1304c1291,1298
  57. <             break;
  58. <         /* Check for errors that may have occurred while reading. */
  59. <         if (c < 0) {
  60. <             /* Error occurred while reading. */
  61. <             if (errno != EPIPE)
  62. <                 PERROR("ReceiveBinary", "netin");
  63. <             bytes = -1;
  64. <             break;
  65. <         }
  66. <         /* Write out the same block we just read in. */
  67. <         d = write(fileno(fout), xferbuf, c);
  68. ---
  69. >           break;
  70. >         
  71. >         /* Error occurred while reading. */
  72. >         if (errno != EPIPE)
  73. >           PERROR("ReceiveBinary", "netin");
  74. >         bytes = -1;
  75. >         break;
  76. >       }
  77. 1305a1300,1314
  78. >       /* Update the byte counter. */
  79. >       bytes_in += c;
  80. >       bytes += (long) c;
  81. >       /* Print progress indicator. */
  82. >       if (do2 != 0)
  83. >         do2 = progress_report(0);
  84. >       
  85. >       /*
  86. >        * Write if buffer became full
  87. >        */
  88. >       if (bytes_in == (int)xferbufsize) {
  89. >         bytes_in = 0;
  90. >         /* Write out the whole block */
  91. >         d = write(out_file, xferbuf, (int)xferbufsize);
  92. 1307,1308c1316,1318
  93. <         if ((d < 0) || (ferror(fout))) {
  94. <             /* Error occurred while writing. */
  95. ---
  96. >         if (d < (int)xferbufsize) {
  97. >           /* Error occurred while writing. */
  98. >           if (d < 0)
  99. 1310,1312c1320
  100. <             break;
  101. <         }
  102. <         if (d < c) {
  103. ---
  104. >           else
  105. 1314c1322
  106. <             break;
  107. ---
  108. >           break;
  109. 1316,1322c1324
  110. <         /* Update the byte counter. */
  111. <         bytes += (long) c;
  112. <         /* Print progress indicator. */
  113. <         if (do2 != 0)
  114. <             do2 = progress_report(0);
  115. ---
  116. >       }
  117. 1323a1326,1338
  118. >     /* Write out if necessary */
  119. >     if (bytes_in > 0) {
  120. >       d = write(out_file, xferbuf, bytes_in);
  121. >       
  122. >       /* Check for write errors. */
  123. >       if (d < bytes_in) {
  124. >         /* Error occurred while writing. */
  125. >         if (d < 0)
  126. >           PERROR("ReceiveBinary", "outfile");
  127. >         else
  128. >           (void) fprintf(stderr, "%s: short write\n", localfn);
  129. >       }
  130. >     }
  131. 1546c1561
  132. <     
  133. ---
  134. 1757a1773
  135.